import request from '@/utils/request'

// 按用户名搜索
export const querySearchUser = (params) => {
	return request('GET', '/app/user/search', params)
}

// 按用户名搜索
export const queryUserList = (params) => {
	return request('GET', '/app/user/list', params)
}

// 获取用户信息(自己)
export const queryUserInfo = (params) => {
	return request('GET', '/app/user/info', params)
}

// 获取用户信息(个人)
export const queryOtherUserInfo = (userId, params) => {
	return request('GET', `/app/user/${userId}`, params)
}

// 获取批量用户信息
export const queryBatchUserInfo = (params) => {
	return request('GET', '/app/user/batchInfo', params)
}
// 修改用户信息
export const updateUserInfo = (params) => {
	return request('PUT', '/app/user', params)
}
// 黑名单列表
export const blockUserList = (params) => {
	return request('GET', '/app/blockUser/list', params)
}

// 添加黑名单
export const addBlockUser = (params) => {
	return request('POST', '/app/blockUser', params)
}

// 移除黑名单
export const unBindBlockUser = (userId) => {
	return request('delete', `/app/blockUser/${userId}`)
}

// 我的钱包
export const getWalletList = (params) => {
	return request('GET', '/app/account/list', params)
}

// 我的钱包详情列表（流水）
export const getWalletDetailList = (params) => {
	return request('GET', '/app/flow/list', params)
}


// 更换邮箱
export const changeEmail = (params) => {
	return request('POST', '/app/changeEmail', params)
}

// 更换手机号
export const changeUserPhone = (params) => {
	return request('POST', '/app/changeUserPhone', params)
}
